/**
 * Created by wang on 2017/2/28.
 */
$(function(){
	var report = new myReport();
	report.daily_gaugechart(pm);
	createEchartS(qssj,jssj,data);
	
	function createEchartS(a,b,data){
		var myChart = echarts.init(document.getElementById('echart'));
		/*var dataAll = [
		               [
		                   [1, 1],[2, 2.5],[3,2.5],
		                   [4, 4],[5, 7],[6, 1],
		                   [7, 2],[8, 3],[9, 4],
		                   [10, 7],[11, 2],[12, 3],
		                   [13, 4],[14, 7],[15, 2],
		                   [16, 3],[17, 4],[18, 7], 
		                   [19, 2],[20, 3],[21, 4],
		                   [22, 7],[23, 2],[24, 3],
		                   [25, 4],[26, 7],[27, 2],
		                   [28, 3],[29, 4],[30, 7]
		               ]
		           ];*/
		var dataAll = [data];
		option = {
			    title: {
			        x: 'center',
			        text:a+'至'+b,
			        textStyle:{fontSize:16,fontWeight:'normal'}
			    },
			    grid:{y2:10},
			    tooltip: {
			        formatter: 'Group {a}: ({c})'
			    },
			    xAxis: [
			        {name:'日期',type:'time',splitLine:false,nameLocation:'end',nameGap:'7',gridIndex: 0,data:'',axisLabel:false,axisTick:{show:false,length:1},splitNumber:30}
			    ],
			    yAxis: [
			        {name:'早餐时间',type:'value',gridIndex: 0,axisTick:false}
			    ],
			    series: [
			      	{   itemStyle :{
				  	              normal:{
					                  color:"#88dbfa"
					               }
			        			},
			            name: 'I',
			            type: 'scatter',
			            xAxisIndex: 0,
			            yAxisIndex: 0,
			            data: dataAll[0],
			        
			        }
			    ]
			};
		  myChart.setOption(option);
	}
});

